package com.java.yihur.coffeebar;

/**
 * 饮品抽象类
 * @author yihur
 */
public abstract class BaseDrink {

    public String description;

    public Integer amount = 1;

    private float price = 0f;


    public void setDescription(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description + "-" + this.getPrice();
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price * amount;
    }

    public void setAmount(Integer amount){
        if (amount >= 1){
            this.amount = amount;
        }
    }



    /**
     * 总价
     * @return
     */
    public abstract float cost();

}
